---
sidebar_position: 10
description: How to configure a Slack Notifier
---
import { integrations } from "@site/data/integrations";
import {Mandatory, NotMandatory} from "@site/src/components/checks/checks";
export const notifierName = 'Slack'
export const info = integrations.notifiers.find((r) => r.name === notifierName)

# Slack

## Overview
{info.longDescription ?? info.description}

## About {notifierName} Notifier
The **Slack** notifier allows you to get notification on your favorite slack channel when an instance of `go-feature-flag` is detecting changes in the configuration file.

<center><img src="/docs/notifier/slack_notification.png" /></center>

## Configure Slack Notification
1. First, you need to create an incoming webhook on your slack instance.
*You can follow this [documentation to see how to do it](https://api.slack.com/messaging/webhooks#getting_started)*
2. Copy your webhook URL.
It should look like: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`.
3. Now you can configure your notifier

## Configure the relay proxy

To configure your relay proxy to use the {notifierName} notifier, you need to add the following
configuration to your relay proxy configuration file:

```yaml title="goff-proxy.yaml"
# ...
notifier:
  - kind: slack
    webhookUrl: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
# ...
```
| Field name   |   Mandatory   | Type   | Default  | Description                                                                                            |
|--------------|:-------------:|--------|----------|--------------------------------------------------------------------------------------------------------|
| `kind`       | <Mandatory /> | string | **none** | **Value should be `slack`**.<br/>_This field is mandatory and describe which retriever you are using._ |
| `webhookUrl` | <Mandatory /> | string | **none** | The complete URL of your incoming webhook configured in Slack.                                         |

## Configure the GO Module
To configure your GO module to use the {notifierName} notifier, you need to add the following
configuration to your `ffclient.Config{}` object:

```go title="example.go"
err := ffclient.Init(ffclient.Config{
    // ...
    Notifiers: []notifier.Notifier{
        &slacknotifier.Notifier{
            SlackWebhookURL: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
        },
        // ...
    },
})
defer ffclient.Close()
```

| **Field**         | **Mandatory** | **Description**                         |
|-------------------|:-------------:|-----------------------------------------|
| `SlackWebhookURL` | <Mandatory /> | The complete URL of your slack webhook. |
